<?php
(!defined('IN_TOA') || !defined('IN_ADMIN')) && exit('Access Denied!');
/*
	[天生创想] (C)2008-2011 515158 Inc.
	This is NOT a freeware, use is subject to license terms
    URL:http://www.515158.com/
*/

empty($do) && $do = 'list';
if ($do == 'list') {
	//列表信息 
	$wheresql = '';
	$page = max(1, getGP('page','G','int'));
	$pagesize = 20;
	$offset = ($page - 1) * $pagesize;
	$url = 'admin.php?ac=eweb&fileurl=user';
	$num = $db->result("SELECT COUNT(*) AS num FROM ".DB_TABLEPRE."web");
     $sql = "SELECT * FROM ".DB_TABLEPRE."web ORDER BY id desc LIMIT $offset, $pagesize";
	$result = $db->fetch_all($sql);

	include_once('template/eweb.php');

} elseif ($do == '删 除') {

	$idarr = getGP('id','P','array');
	foreach ($idarr as $id) {
	$db->query("DELETE FROM ".DB_TABLEPRE."web WHERE id = '$id'");
	if($id!='')
	{
   $oalog = array(
		'uid' => $_USER->id,
		'content' => "删除收藏信息",
		'title' => '删除收藏信息',
		'startdate' => get_date('Y-m-d H:i:s',PHP_TIME),
		'contentid' => $id,
		'type' => '21'
	);
	insert_db('oalog',$oalog);
	
	}
	}
	goto_page('admin.php?ac=eweb&fileurl=user&message=1');

} 


?>